<%@page contentType="text/html;charset=utf-8" %>
<%@taglib prefix="s" uri="/struts-tags" %> 
<script type="text/javascript">
function savechannelapppointofbilling(cpid,appnumber,channelappnumber)
{
	 if (!confirm("确定继续？"))
	    {
	        return false;
	    }
	    var url = "mg/channelapppointofbilling/save.do?model.appnumber=" + appnumber
        + "&cp.id=" + cpid
        + "&model.channelappnumber="+channelappnumber;
	    
	    var objectid = "cm_channelappdiv";
	    postXMLHttpRequest(url, "myform", objectid);
}
</script>
<form id="myform" name="myform"
        method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5"></td>
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td >
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="images/table_top_left.jpg" width="20" height="15" /></td>
            <td><img src="images/table_top_bg.jpg" width="770" height="15"/></td>
            <td align="right">
              <img src="images/table_top_right.jpg" width="20" height="15" /></td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td height="25" class="table_blue">
          </td>
      </tr>   
      <tr>
      <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0"
           style="word-break:break-all;">
      <tr>
        <td align="center" class="table_g1" width="10%">计费点</td>
        <td align="center" class="table_g2" width="10%">计费点编号</td>
        <td align="center" class="table_g2" width="10%">计费是否提示</td>
        <td align="center" class="table_g2" width="10%">提示类型</td>
        <td align="center" class="table_g2" width="60%">提示内容</td>
      </tr>
      
      <s:if test="aplist.size > 0" >
        <s:iterator value="aplist" status="stat">
        <s:set name="str1" value=""></s:set>
         <s:set name="str2" value=""></s:set>
          <s:set name="str3" value=""></s:set>
        <s:iterator value="list" status="stat1">
        	<s:if test="apppointofbillingcode.equals(code)">
        		<s:set name="str1" value="list.get(#stat1.index).confirm"/>
         		<s:set name="str2" value="list.get(#stat1.index).confirmtype"/>
          		<s:set name="str3" value="list.get(#stat1.index).confirmstr"/>
        	</s:if>
        </s:iterator>
        <tr class="trselect"> 
          <td class="table_w1" align="center"><input type="hidden" id="apppointofbillingid" name="apppointofbillingid" value="<s:property value="id"/>"><s:property value="pointofbillingname" /></td>
          <td class="table_w2" align="center"><input type="hidden" id="apppointofbillingcode" name="apppointofbillingcode" value="<s:property value="code"/>"><s:property value="code" /></td>
          <td class="table_w2" align="center">
          	 <select id="confirm" name="confirm">
          	 	<option value="true" <s:if test='#str1.equals("true")'>selected</s:if>>是</option>
          	 	<option value="false" <s:if test='#str1.equals("false")'>selected</s:if>>否</option>
          	 </select>
          </td>
          <td class="table_w2" align="center">
          	<select id="confirmtype" name="confirmtype">
          	 	<option value="sp" <s:if test='#str2.equals("sp")'>selected</s:if>>SP提示</option>
          	 	<option value="pb" <s:if test='#str2.equals("pb")'>selected</s:if>>计费点提示</option>
          	 </select>
          </td>
          <td class="table_w2" align="center">
		  	<textarea rows="6" cols="50" id="confirmstr" name="confirmstr"><s:property value="#str3"/></textarea>
		  </td>
        </tr>    
        </s:iterator>
      </s:if>
      </table>
      </td>
      </tr>
      <tr>
        <td align="center" class="table_w1">
            <button id="channelapppointobillingbtnBack" dojoType="dijit.form.Button"  
                onclick="savechannelapppointofbilling('<s:property value="cp.id"/>','<s:property value="model.getAppnumber()"/>','<s:property value="model.getChannelappnumber()"/>');">保存</button>
        </td>          
      </tr>
      <tr> 
        <td background="images/table_bom_bg.jpg">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>
              <img src="images/table_bom_left.jpg" width="20" height="15"></td>
            <td></td>
            <td align="right">
              <img src="images/table_bom_right.jpg" width="20" height="15"></td>
          </tr>
          </table>
        </td>
      </tr>
    </table>  
  </td>
  <td width="5"></td>
  </tr>
  </table>
  </form>